package com.sc.VenusQueryBeta.model.account.xiadaikuan;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.xiadaikuan.XiaDaiKuan01Contract;
import com.sc.VenusQueryBeta.model.bean.account.AllRoomListBean;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.xiadaikuan.XiaDaiKuan01Bean;

import io.reactivex.Observable;


/**
 * Created by Administrator on 2018/10/21.
 */

public class XiaDaiKuan01Model extends BaseModel implements XiaDaiKuan01Contract.IXiaDaiKuan01Model {

    /**
     * 实例化对象
     */
    public static XiaDaiKuan01Model newInstance(){
        return new XiaDaiKuan01Model();
    }

    @Override
    public Observable<XiaDaiKuan01Bean> getXiaDaiKuan01(String serverAddress, String projectName, int serverPort, int clientindex, String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                xiadaikuan01(clientindex,currencynameCN).compose(RxHelper.<XiaDaiKuan01Bean>rxSchedulerHelper());
    }

    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());

    }

//    @Override
//    public Observable<AllRoomListBean> queryAllRoomList(String serverAddress, String projectName, int serverPort) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryAllRoomList().compose(RxHelper.<AllRoomListBean>rxSchedulerHelper());
//
//    }
}
